package ace.module.account.core.impl.service;

import ace.cmp.core.model.PageDto;
import ace.cmp.core.model.PageResultDto;
import ace.module.account.api.model.dto.IamAccountDetailDto;
import ace.module.account.api.model.input.IamAccountCommonInfoOutInput;
import ace.module.account.api.model.input.IamAccountModifyStatusInput;
import ace.module.account.api.model.input.IamAccountSearchInput;
import ace.module.account.api.model.input.IamAccountSearchOutInput;
import ace.module.account.api.model.input.IamAccountWithProfileSearchInput;
import ace.module.account.api.model.input.RegisterQuickByPhoneInput;
import ace.module.account.api.model.input.RegisterQuickByUsernameInput;
import ace.module.account.api.model.input.RegisterQuickByUsernameOutInput;
import ace.module.account.api.model.input.RegisterQuickByWxMiniAppIdAndOpenIdInput;
import ace.module.account.api.model.input.account.IamAdminAccountAdminSaveInput;
import ace.module.account.api.model.input.account.IamAdminAccountAdminSearchInput;
import ace.module.account.api.model.input.register.RegisterQuickByPhoneOutInput;
import ace.module.account.core.impl.model.dto.IamAdminAccountListItemDto;
import ace.module.common.api.model.input.PageInput;
import java.util.List;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.transaction.annotation.Transactional;

/**
 * @author caspar
 * @date 2023/3/18 16:16
 */
public interface IamAccountService {

  @Transactional(rollbackFor = Exception.class)
  void modifyStatus(List<IamAccountModifyStatusInput> input);

  Long registerQuickByUsername(RegisterQuickByUsernameInput input);

  Long registerQuickByUsernameAndAppOutInfo(RegisterQuickByUsernameOutInput input);

  Long registerQuickByPhone(RegisterQuickByPhoneInput input);

  Long registerQuickByWxMiniAppIdAndOpenId(RegisterQuickByWxMiniAppIdAndOpenIdInput input);

  Page<IamAccountDetailDto> pageWithProfile(String query, Long iamAppId, Pageable pageable);

  PageResultDto<IamAccountDetailDto> pageWithProfile(IamAccountWithProfileSearchInput input, PageDto page);

  PageResultDto<IamAccountDetailDto> searchWithProfile(PageInput<IamAccountSearchInput> input);

  PageResultDto<IamAccountDetailDto> searchWithProfileByOutInfo(PageInput<IamAccountSearchOutInput> input);

  Long registerQuickByPhoneOutInput(RegisterQuickByPhoneOutInput input);

  void modifyCommonInfo(IamAccountCommonInfoOutInput input);

  void modifyStatus(IamAccountModifyStatusInput input);

  Page<IamAdminAccountListItemDto> adminSearch(IamAdminAccountAdminSearchInput input, Pageable pageable);

  Long adminSave(IamAdminAccountAdminSaveInput input);

  void remove(List<Long> ids);
}
